
const express        = require('express');
const router = express.Router();

const bodyParser     = require('body-parser');
var multer  = require('multer')
var upload = multer({ dest: './uploads/' })
var cors = require('cors');

router.use(cors())

var obj = {
    name:"你好",
    shortname:"集创佳禾",
    en:"talenseed",
    shorten:"",
    logo:"https://www.blender.org/wp-content/themes/bthree/assets/images/blender_logo_square.png",
    date:1516600995,
    phone: 13333333333,
    // nickname: '蜂窝煤煤煤煤',
    pfee1:null,
    pfee2:null,
    tmfee1:null,
    tmfee2:null,
    trainfee:null,
    proxyfee:null,
    awardfee:null,
    elsefee:null
};

router.get('/api/getfile/:fn', (req, res) => {
    console.log(req.params);
    var fn = req.params.fn;
    res.header('Access-Control-Allow-Origin', 'http://localhost:8080');
    res.header('Access-Control-Allow-Credentials', 'true');
    res.send(`"http:\\/\\/gb.talenmall.com\\/document\\/\\/${fn}.doc"`);
});

module.exports = router;